<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <form id="my-form" class="am-form tpl-form-line-form" method="post">
                    <div class="widget-body">
                        <fieldset>
						<?php if($wechat['wechat_appid']): ?>
                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl">公众号信息</div>
                            </div>
							<div class="tips am-margin-bottom-sm am-u-sm-12">
								<div class="pre">
									<p> 请完成以下两个步骤：1.该公众号关联到开放平台，2.商家管理 -> 一键同步公众号粉丝。否则用户无法”注册“</p>
								</div>
							</div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">切换绑定 </label>
                                <div class="am-u-sm-9">
									<div class="am-btn-group am-btn-group-xs">
										<a class="am-btn am-btn-default am-btn-secondary am-radius"
										   href="<?= $admin['user']['config_id']==0?'#':'/wechat.php'?>">
											<span class="am-icon-retweet am-icon-sm"></span> <?= $admin['user']['config_id']==0?'测试用户不可切换':'切换公众号'?>
										</a>
									</div>
                                </div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">头像 </label>
                                <div class="am-u-sm-9">
                                    <a href="<?= $wechat['wechat_logo'] ? $wechat['wechat_logo'] : 'assets/store/img/wechat.png' ?>" title="点击查看大图" target="_blank">
                                        <img style="border-radius: 50%;" src="<?= $wechat['wechat_logo'] ? $wechat['wechat_logo'] : 'assets/store/img/wechat.png' ?>" width="72" height="72" alt="">
                                    </a>
									
									<a href="<?= $wechat['wechat_qrcode'] ?>" title="点击查看大图" target="_blank">
                                        <img style="margin-left:50px;" src="<?= $wechat['wechat_qrcode'] ?>" width="72" height="72" alt="">
                                    </a>
                                </div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">昵称 </label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="<?= $wechat['wechat_nick'] ?>" disabled="disabled">
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">AppID </label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="<?= $admin['user']['config_id']==0?'*****************************':$wechat['wechat_appid']?>" disabled="disabled">
                                </div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">账号主体 </label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="<?= $wechat['wechat_principal']?>" disabled="disabled">
                                </div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">原始ID </label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="<?= $wechat['wechat_id']?>" disabled="disabled">
                                </div>
                            </div>
						<?php else:?>
							<div class="widget-head am-cf">
                                <div class="widget-title am-fl">您还没有绑定公众号</div>
                            </div>
							<div class="widget-body am-cf">
								<div style="background:#eeeeee;margin-left:100px;border-radius:10px;padding:20px;" class="am-u-sm-6 am-u-md-6 am-u-lg-3">
									<div style="text-align:center;">我已有微信公众号</div>
									<div style="margin-top:20px;text-align:center;">
										<a class="am-btn am-btn-default am-btn-success" href="/wechat.php">
                                            一键绑定
                                        </a>
									</div>
								</div>
								<div style="background:#eeeeee;margin-left:100px;border-radius:10px;padding:20px;" class="am-u-sm-6 am-u-md-6 am-u-lg-3">
									<div style="text-align:center;">我还没有微信公众号</div>
									<div style="margin-top:20px;text-align:center;">
										<a class="am-btn am-btn-default am-btn-success" href="https://mp.weixin.qq.com" target="_blank">
                                            我去注册
                                        </a>
									</div>
								</div>
								<div style="" class="am-u-sm-6 am-u-md-6 am-u-lg-3">
								</div>
							</div>
						<?php endif; ?>
                        </fieldset>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
